/**
 * 项目名称:
 *
 * @Author: 夏国倩
 * @Date: 2023/9/11 19:36
 * @Copyright
 *
 * 请编写程序实现以下业务。
 * 教室有一个日光灯，默认亮度为1000。
 * 张三走进教室，看到教室很黑，打开了日光灯（常规亮度）
 * 李四走进教室，看到灯光太亮，调到了600.
 * 王五走进教室，感觉太暗，调到了800.
 */
package AbstractClass4;
public class Light {
    private int brightness=1000;
    public void adjustBringhtness(int brightness){
        this.brightness=brightness;
    }
    public int getBrightness(){
        return brightness;
    }
}

class ZhangSan extends Light{
    public ZhangSan(){
        super();
        adjustBringhtness(1000);//张三默认亮度为1000
    }
}

class LiSi extends Light{
    public LiSi(){
        super();
        adjustBringhtness(600);//李四调节灯光亮度为600
    }
}

class WangWu extends Light{
    public WangWu(){
        super();
        adjustBringhtness(800);//王五调节灯光亮度为800
    }
}

